package com.ssy.bus.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author ssy
 * 处方
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("bus_prescription")
public class Prescription implements Serializable {
    private static final long serialVersionUID = -8027878428885623108L;

    private String outpatientId;

    private Integer preId;

    private Integer type;

    private Integer number;

    private Integer isPay;

    private String remark;

    @TableField(exist = false)
    private Integer[] ids;

    @TableField(exist = false)
    private Integer drugId;

    @TableField(exist = false)
    private String drugName;

    @TableField(exist = false)
    private Integer inspectId;

    @TableField(exist = false)
    private String inspectName;

    @TableField(exist = false)
    private String company;

    @TableField(exist = false)
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal price;

    @TableField(exist = false)
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal money;

    public Prescription(String outpatientId, Integer preId, Integer type, Integer number, Integer isPay, String remark) {
        this.outpatientId = outpatientId;
        this.preId = preId;
        this.type = type;
        this.number = number;
        this.isPay = isPay;
        this.remark = remark;
    }

}
